package com.pandora.common.db;

public class DBSessionHolder {
	private static ThreadLocal<DBSession> dbSessionHolder = new ThreadLocal<DBSession>();

	public static void setCurrendDBSession(DBSession dbSession) {
		dbSessionHolder.set(dbSession);
	}

	public static DBSession getCurrentDBSession() {
		return ((DBSession) dbSessionHolder.get());
	}

	public static void clearDBSession() {
		dbSessionHolder.set(null);
	}
}